package com.jvm;

public class TestStringPool {

    public static void main(String args[]){
        String helloWorld = "helloworld";
        String hello = "hello";
        String world = "world";

        //输出true
        System.out.println(helloWorld=="hello"+"world");
        //输出false
        System.out.println(helloWorld==hello+world);
        //输出true
        System.out.println(helloWorld==(hello+world).intern());
    }
}
